#include <stdlib.h>
#include "vector.h"
#include <stdio.h>

void check(bool test) {
	if (!test)
		exit(1);
}

int main() {
	nbds::vector<int> l(2);

	l.push_back(5);

	nbds::vector<int>::iterator it = l.begin();
	check(*it == 5);

	l.push_back(8);
	it = l.begin();
	check(*it == 5);
	it++;
	check(*it == 8);
	it--;
	check(*it == 5);

	l.push_back(9);

	l.push_back(1);
	l.push_back(7);
	l.push_back(15);

	it = l.begin();
	check(*it++ == 5);
	check(*it++ == 8);
	check(*it++ == 9);
	check(*it++ == 1);
	check(*it++ == 7);
	check(*it == 15);
}
